<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<div class="row" th:fragment="noramlList(tableName)">
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel">

            <div class="x_content">
                <table th:id="${tableName}" class="table table-striped table-bordered">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>[博文板块]</th>
                        <th>名称</th>
                        <th>热度</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody></tbody>
                </table>
            </div>
        </div>
    </div>
    <script>
        // dataTable数据初始化
        const columns = [
            {data: 'id'},
            {
                render: function (data, type, row) {
                    return $c.label(row.plateName, 2) ;
                }
            },
            {data: 'name'},
            {
                data: "articleNum",
                render:function (data) {
                    let html = '<i class="fa fa-heart" style="color:brown"> '+ data +' </i>';
                    return html;
                }
            },
            {
                'data': 'id',
                'width': '160px',
                "render": function (data, type, row) {
                    let html = '';
                    html += $c.button('编辑', "editCategory(" + data + ")", 'success');
                    html += $c.button('删除', "delCategory(" + data + ")", 'danger');
                    return html;
                },
            }
        ];
    </script>
</div>
</html>
